using System;
using System.Collections.Generic;
using System.Text;

namespace Slf.Samples.TraceLogging
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.ForegroundColor = ConsoleColor.Green;
      Console.Out.WriteLine("Trace was configured via app.config in order to write to the console.");
      Console.Out.WriteLine("For more information on Trace, see: http://msdn.microsoft.com/en-us/library/zs6s4h68.aspx");
      Console.ResetColor();


      //set up TraceLogger
      ILogger logger = new TraceLogger();
      LoggerService.SetLogger(logger);
      
      //do some work
      DoSomeWork();
      Console.ReadLine();
    }



    private static void DoSomeWork()
    {
      //get the logger via LoggerService
      ILogger logger = LoggerService.GetLogger();

      //log info
      logger.Warn("This is a warning.");
    }
  }
}